<?php
$this->deleteByCheckbox('.deleteQuestion',$this->baseUrl() . '/harmonogram/delete/format/html','.message');
?>
<div class="adminPanel">
	<div class="toolboxImg icon-harmonogram">Správa harmonogramov</div>
	<div class="toolbox">
		<table class="toolbox">
			<tr>
				<td>				
					<a href="<?php echo  $this->url(array('controller' => 'harmonogram','action' => 'add'))?>">
						<div class="icon addHarmonogram"></div>
						Pridať
					</a>
				</td>
				<td>
					<a href="#" class="deleteQuestion">
						<div class="icon delete"></div>
						Odstrániť
					</a>
				</td>
			</tr>
		</table>
	</div>
	<div class="clear"></div>
</div>
<div class="message"></div>
<form>
<table>
	<tr>
		<th>#</th>
		<th></th>
		<th>
			Poradie
		</th>
		<th>Odbor</th>
		<th>Meno skúšaného</th>		
		<th>Skušajúca komisia</th>
		<th>Blok 1</th>
		<th>Blok 2</th>
		<th>Bc. práca</th>
	</tr>
<?php
foreach ($this->harmonograms as $harmonogram):
?>
	<tr id="<?php echo  $harmonogram->hid?>">
		<td class="center"><?php echo  ++$harmonogram->ord ?></td>
		<td class="center"><input type="checkbox" name="<?php echo  $harmonogram->hid?>" value="<?php echo  $harmonogram->hid?>"></td>
		<td class="center">			
			<a href="#" class="rowUp">Up</a>/<a href="#" class="rowDown">Down</a>
		</td>
		<td class="left"><?php echo  $this->students[$harmonogram->ID_st]['Odbor']?></td>
		<td class="left">
			<?php 
			echo $this->students[$harmonogram->ID_st]['Jmeno'] . ' ' .
				 $this->students[$harmonogram->ID_st]['Prijmeni']
			?>
		</td>		
		<td class="left"><?php echo  $harmonogram->cname ?></td>
		<td class="right">
			<?php
			if($harmonogram->block1 != null){
				$block1 = new Zend_Date($harmonogram->block1,'YYYY-mm-dd');
				echo $block1->toString('dd.mm.YYYY');
			} 
			?>
		</td>
		<td class="right">
			<?php
			if($harmonogram->block2 != null){ 
				$block2 = new Zend_Date($harmonogram->block2,'YYYY-mm-dd');
				echo $block2->toString('dd.mm.YYYY');
			}
			?>
		</td>
		<td class="right">
			<?php 
			if($harmonogram->bcdate != null){
				$bcdate = new Zend_Date($harmonogram->bcdate,'YYYY-mm-dd');
				echo $bcdate->toString('dd.mm.YYYY');
			} 
			?>
		</td>		
	</tr>
<?php endforeach;?>	
</table>
</form>